$db = $this->getDB();
$params = $this->extractRequestParams( false );
- $revisionStore = MediaWikiServices::getInstance()->getRevisionStore();
+ $services = MediaWikiServices::getInstance();
+ $revisionStore = $services->getRevisionStore();
$result = $this->getResult();
if ( $params['namespace'] !== null ) {
$params['namespace'] = array_unique( $params['namespace'] );
sort( $params['namespace'] );
- if ( $params['namespace'] != MWNamespace::getValidNamespaces() ) {
+ if ( $params['namespace'] != $services->getNamespaceInfo()->getValidNamespaces() ) {
$needPageTable = true;
if ( $this->getConfig()->get( 'MiserMode' ) ) {
$miser_ns = $params['namespace'];
if ( $resultPageSet === null ) {
$this->parseParameters( $params );
- $revQuery = $revisionStore->getQueryInfo(
- $this->fetchContent ? [ 'page', 'text' ] : [ 'page' ]
- );
+ $revQuery = $revisionStore->getQueryInfo( [ 'page' ] );
} else {
$this->limit = $this->getParameter( 'limit' ) ?: 10;
$revQuery = [
if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
// Paranoia: avoid brute force searches (T19342)
- if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
+ if ( !$this->getPermissionManager()->userHasRight( $this->getUser(), 'deletedhistory' ) ) {
$bitmask = RevisionRecord::DELETED_USER;
- } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
+ } elseif ( !$this->getPermissionManager()
+ ->userHasAnyRight( $this->getUser(), 'suppressrevision', 'viewsuppressed' )
+ ) {
$bitmask = RevisionRecord::DELETED_USER | RevisionRecord::DELETED_RESTRICTED;
} else {
$bitmask = 0;